/**
 * <pre>
 * @(#)ChartConfig.java 1.00 2009-11-11
 * 
 * Copyright (c) 1998, 2009 Regular Individual. All rights reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * Contributor(s):
 *     Haixu Huang
 * </pre>
 **/
package cn.sh.huang.chart.config;

import java.awt.Font;

import cn.sh.huang.chart.ext.enumtype.Amplitude;
import cn.sh.huang.chart.ext.enumtype.ChartType;
import cn.sh.huang.chart.view.AbstractView;

/**
 * <pre>
 * ChartConfig ...
 * 
 * @version 1.0
 * </pre>
 */
public class ChartConfig extends AbstractConfig
{
    private static final Font DEFAULT_FONT = new Font("Dialog", Font.PLAIN, 9);

    private ChartType type = null;
    private Amplitude amplitude = Amplitude.FULL;
    private Font font = DEFAULT_FONT;

    /**
     * @param view
     */
    public ChartConfig(AbstractView view)
    {
        super(view);
    }

    public ChartType getType()
    {
        return type;
    }

    public void setType(ChartType type)
    {
        this.type = type;
        update();
    }

    public void setAmplitude(Amplitude amplitude)
    {
        this.amplitude = amplitude;
        update();
    }

    public Amplitude getAmplitude()
    {
        return amplitude;
    }

    public void setFont(Font font)
    {
        this.font = font;
        update();
    }

    public Font getFont()
    {
        return font;
    }
}
